<%@page import="com.itextpdf.text.log.SysoCounter"%>
<%@page import="CustomClassFile.yueli.WqcxSearch"%>
<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.general.Util"%>
<%@ page import="com.weaver.formmodel.mobile.manager.MobileUserInit"%>
<%@ page import="weaver.hrm.User"%>
<%
String type=request.getParameter("type");
int userid=Util.getIntValue(request.getParameter("userid"));
/*在移动端这样获取当前用户*/
User user = MobileUserInit.getUser(request, response);
if(userid==-1){
	userid=	user.getUID();
}
if("1".equals(type)){
	out.print(WqcxSearch.getKaoqingqijian());
}else{
	
	int pageNo = Util.getIntValue(request.getParameter("pageNo"));
	int pageSize = Util.getIntValue(request.getParameter("pageSize"));
	String searchKey = Util.null2String(request.getParameter("searchKey"));
	String name="";
	String date="";
	String date2="";
	if(searchKey!=null){
		String[] params=searchKey.split("&");
		for(String param:params){
			if(param.startsWith("name")){
				name=param.substring(4);
			}
			if(param.startsWith("date")){
				date=param.substring(4);
			}
			if(param.startsWith("enddate")){
				date2=param.substring(7);
			}
		}
	}
	out.print(WqcxSearch.selectRecord(String.valueOf(userid), date,date2,name, pageNo, pageSize));
}
%>